package com.maychat.enums;

import lombok.Getter;

@Getter
public enum MessageStatus {

    SENT("已发送"),
    SENDING("发送中");
    private String desc;

    MessageStatus(String desc) {
        this.desc = desc;
    }

    public static MessageStatus getByOrdinal(Integer ordinal) {
        MessageStatus[] values = MessageStatus.values();
        if (ordinal == null || ordinal < 0 || ordinal >= values.length)
            return null;
        return values[ordinal];
    }
}
